﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Linq;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Domain.Dummies.Dtos;

namespace KernelWorkflow.Activities
{
    public partial class CheckRightsActivity : SequenceActivity
    {
        public CheckRightsActivity()
        {
            InitializeComponent();
        }


        public static DependencyProperty SessionProperty = DependencyProperty.Register("Session", typeof(SessionDto), typeof(CheckRightsActivity));
        public static DependencyProperty AccessObjectProperty = DependencyProperty.Register("AccessObject", typeof(string), typeof(CheckRightsActivity));
        public static DependencyProperty IsAccessGrantedProperty = DependencyProperty.Register("IsAccessGranted", typeof(Boolean), typeof(CheckRightsActivity));

        [Category("AUTHORIZATION_INPUT")]
        [Browsable(true)]
        public SessionDto Session
        {
            get
            {
                return ((SessionDto)(base.GetValue(CheckRightsActivity.SessionProperty)));
            }
            set
            {
                base.SetValue(CheckRightsActivity.SessionProperty, value);
            }
        }

        [Category("AUTHORIZATION_INPUT")]
        [Browsable(true)]
        public string AccessObject
        {
            get
            {
                return ((string)(base.GetValue(CheckRightsActivity.AccessObjectProperty)));
            }
            set
            {
                base.SetValue(CheckRightsActivity.AccessObjectProperty, value);
            }
        }

        [Category("AUTHORIZATION_OUTPUT")]
        [Browsable(true)]
        public Boolean IsAccessGranted
        {
            get
            {
                return ((Boolean)(base.GetValue(CheckRightsActivity.IsAccessGrantedProperty)));
            }
            set
            {
                base.SetValue(CheckRightsActivity.IsAccessGrantedProperty, value);
            }
        }

    }
}
